waste_dict = {
    "可回收垃圾": ["玻璃", "金属", "塑料瓶"],
    "干垃圾": ["塑料袋"],
    "湿垃圾": ["剩饭剩菜"],
    "有害垃圾": ["电池"]
}

while True:
    search_waste = input("请输入您要查询的垃圾名称：")
    find = False
    if search_waste == "q":
        break

    for classify, waste in waste_dict.items():
        if search_waste in waste:
            find = True
        print(f"您输入的垃圾名称在{search_waste}分类里面，分类是{classify}")
    print("*"*30)

    if find == False:
        print("")
